# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        潘炎珍  
# Name:         hw02
# Description:
# Author:       98745
# Date:         2019/3/23
#-------------------------------------------------------------------------------

class JCException(Exception):#定义异常类
    pass


class Caculate:            #定义计算阶乘的类
    def compute(self,n):
        if n<0:
            raise JCException('输入的值小于0，请输入大于0的值')
        elif n==1 or n==0:
            return 1
        else:
            return self.compute(n-1)*n


if __name__ == '__main__':
    try:
        n=int(input('请输入一个数:'))
        c=Caculate()
        print('{}！={}'.format(n,c.compute(n)))
    except JCException as e:
        print(e)